package com.zhangfb95.crosschain.server.infra.config.configuration;

import com.zhangfb95.crosschain.infra.util.json.JsonUtil;
import com.zhangfb95.crosschain.server.infra.config.properties.WebServerProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author zhangfubing
 * @since 2019/5/25
 */
@Configuration
public class CheckWebConfiguration implements WebMvcConfigurer {

    @Autowired
    private WebServerProperties webServerProperties;
    @Autowired
    private JsonUtil jsonUtil;
    @Autowired
    private CheckWebHandlerInterceptor checkWebHandlerInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(checkWebHandlerInterceptor);
    }
}
